package com.zxn.arouterdemo

import android.os.Bundle
import android.widget.Button
import androidx.appcompat.app.AppCompatActivity
import com.alibaba.android.arouter.facade.annotation.Route

import com.alibaba.android.arouter.launcher.ARouter

// 在支持路由的页面上添加注解(必选)
// 这里的路径需要注意的是至少需要有两级，/xx/xx
@Route(path = RouterConfig.MAIN_ACTIVITY)
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
        ARouter.getInstance().inject(this)

        findViewById<Button>(R.id.btn_jump0).setOnClickListener {
            //跳转到新的页面
            ARouter.getInstance().build(RouterConfig.SIMPLE_ACTIVITY).navigation()

           /* val intent = Intent(this, JaActivity::class.java)
            startActivity(intent)*/
        }
    }

}